﻿using System.Collections.Generic;
using Shuba.Model;
using System;

namespace Shuba.Business
{
    public class branch_rollout_version
    {
        private Data.branch_rollout_version Branch_rollout_version;

        public branch_rollout_version()
        {
            Branch_rollout_version = new Data.branch_rollout_version();
        }

        public branch_rollout_versionInfo GetApprovalByID(string id, string version)
        {
            return Branch_rollout_version.GetApprovalByID(id,version);
        }

        public List<branch_rollout_versionInfo> GetList(string value, string cluster_id,string regional_id )
        {
            return Branch_rollout_version.GetList(value, cluster_id, regional_id);
        }

        public List<branch_rollout_versionInfo> GetListApproval(string update_by)
        {
            return Branch_rollout_version.GetListApproval(update_by.TrimEnd());
        }

        public branch_rollout_versionInfo Get(string id,string version)
        {
            return Branch_rollout_version.Get(id,version);
        }

        public List<branch_rollout_versionInfo> GetListAll()
        {
            return Branch_rollout_version.GetListAll();
        }

        public Int32[] deleteAll()
        {
            return Branch_rollout_version.deleteAll();
        }

        public int Save(branch_rollout_versionInfo branch_rollout_versionInfo)
        {
            return Branch_rollout_version.Save(branch_rollout_versionInfo);
        }

        public void Approve(string branch_id, string version,string ActType)
        {
            Branch_rollout_version.Approve(branch_id, version,ActType);
        }

        public void Reject(string branch_id,string version)
        {
            Branch_rollout_version.Reject(branch_id,version);
        }

        public List<string> getVersion()
        {
            return Branch_rollout_version.getVersion();
        }

        public List<string> getRegion()
        {
            return Branch_rollout_version.getRegion();
        }

        public List<string> getCluster(string region_id)
        {
            return Branch_rollout_version.getCluster(region_id);
        }

        public List<branch_rollout_versionInfo> getBranchRollout()
        {
            return Branch_rollout_version.getBranchRollout();
        }

        public List<branch_rollout_versionInfo> getBranchRollout(string region_id, string cluster_id, string version)
        {
            return Branch_rollout_version.getBranchRollout(region_id, cluster_id, version);
        }

        public bool IsPending(string branch_id, string version)
        {
            return Branch_rollout_version.IsPending(branch_id, version);
        }
    }
}